Permissions discovery bug fixed