fix all issues for 3.6