Equality testing fixes