fix for ios, better all round

solves #4 , solves #5