fix the error in equals