Fixed variable was not defined