Fixed bug when updating free_slots.first