Fix calling a non-existing function when script was not compiled