Fixed bug with endOfWeek()