Fixing bug which sometimes displayed the wrong calendar when viewing and appointment