Fixed bugs in production code.