Fixed javascript bug which broke bookings