Changed gil functions.