fixed error in appointments view