Attempt to fix dialog dismiss crashes