permissions cache bug fix