Fixed creating of schedule