fixes for staff leave errors