fix bug causing test failure