Fixed case where cancel from set permissions causes NPE