Updated permissions check.