Fixed a bug in the test code.