Fixed a bug where calling deprecated variable.