fix for incorrect handling of certain permission cases