Fix optionsBeforeSubmit and tweak test
Merge pull request #110 from LeeChSien/fix-optionsBeforeSubmit

Fix optionsBeforeSubmit and tweak test