fixed bugs for all final tests