fix with exception for python3