fix bug in calendar