Fix uncaught error is permission callback is made before notification is created