Fixed bugs in calendar page