Implement syncronous submit by checking the status of the task after sub...

...mission. Fix for issue #4078 and #4081