fixed assert when changing page permissions for windows