Ipad fixes. Thanks to @peutetre.