Update schedule.c

fixed allocation of tickets