Fix sheet dismissing code on 10.9+