Fix minor bugs in MealFactory and ScheduleBuilder
Fix #1: in ScheduleBuilder, fix typos and convert SortedSet to array before calling last