Fixed performance issue with page permissions checker