Made changes to fix iOS Safari menu bug