Bug fixing for production tests