fixed error with debug variable