Fixing the button-on-pages bug