Fix for crashes and notifications