Quick changes for 3.12 compatibility