fixes for ios6 & firefox