Fixed some errors found as a result of the Jmeter tests.