Fix some security manager permission issues