Fixed bug in equals.