fixes crashes on iPad