Fixed order bug for unit test issue #988