fix appointments controller