fix for false negative on permission error