Fixes task submitting from web interface
   * incorrect order of initialization / submitting