Fixing optimization algorithm tests.