Permission check method is weird

A fix for weird permission checks.