Fixed typo in perms checking. closes #287