fix checkPermes bug