fixed error local reference