update for mega test: fix 2 bugs