bugfix for attributeerror during comparison