Fix for Ajax for permissions