Several tweaks for iphone support