Fixed some errors with equality testing objects.