tweaks to get it working on iphone sort of