Rebase our patches (in PR) on top of latest master. Sshould fix a crash when requesting permisssions.