bug fix permissions