Fixed a potential crash and removed unnecessary required permissions.