fix python extension errors