Fixed bug in weekly recurrence logic