fixed error with variables