fix a bug in CHECK_EQUAL() function