fix a silent bug, todo: assert, pass or fail