fix funtion loading