CFY-1232 mock bug fix
CFY-1232 revent last commit
CFY-1232 handle terminated tasks before executable tasks