Change method from deprecated dismissModalViewControllerAnimated to dismissViewControllerAnimated: completion: