Fixed bug where we were referncing vars to defined yet