Fix for permission checks