Bug fixes for iPad and some improvements