Implement syncronous submit by checking the status of the task after submission. Fix for issue #4078 and #4081