fixes bugs caused by strict python3 interpreter