[engines] fix a bug in last commit