A better attempt at fixing the issues with animations and queued dismiss