fixed test3, moved pipeline flush to MEM stage