Fixes #977, wrong behavior on form success