Fix  #363, run endSubmit even if no after hooks are defined
Merge pull request #369 from jakozaur/jacek-fix-363

Fix  #363, run endSubmit even if no after hooks are defined