[fix] python3 compatibility