Why is submit button hidden sometimes?