Changed button type from submit to button to prevent double submission