Fixed undefine variable