Fix issue where custom permissions sometimes fail if not running async