py2 compat
fix some deployment logic