fix for compat with earlier Pythons