Fix test remove dead code