Added a begin/rescue clause for permission changes