fixed for older python versions

Fixes bug with older python versions