Fixes #3043 Fixed several cases where task_processed was not called