Fix for Changing permissions in ApplicationRegistry causes error