fix for iOS 8 to prevent "Attempt to dismiss from view controller […] while a presentation or dismiss is in progress" error