If you got rear ended, you should report this to your insurance and let them deal with damages. IT's most likely either the open/closed sensor that's broken or the latch itself is no longer latching properly. Either way, you shouldn't have to deal with this since someone else hit you.