fix subtle bugs in searn