fix error with end of week