fixed compilation error with exter functions