Separate functions for equality tests
Fix failed equality test