Fixes bugs with buttons (forms submitted twice)