Solved minor bug in calendar generation