fixed bug with saving on ipad