WIP: fix a bug in fourStageTest