glitch of your system

Today I got a double booked  reservation. Both reservations were on booking.com site and for the same days. 

And then, Booking allowed to cancel this reservation saying that they will not charge me. ( Daaah!)

How the system allowed it?

How to avoid/correct that ?

what needs to be done to not have such repeats.