fixes for issue #8 and PEP 449