permission manager check and fix.