fixed expect bug