critical bug fix #184 for permissions fix