Make python3 compatible