minor pythonic fix