Make 3.6.5 compatible