Fix checkPermission problem 2

Try 2