fixed bug in error-testing function assert_eq