Fixed missing reference variables and some Syso.