fix bug in equal.cpp