Changing button type to avoid auto-submitting forms