Fixed an inconsistency with last calendar when calendar number is over 5