Fixed several bugs displaying calendar view