Fixed a bug with a wrong variable name