fix ref to undefined var -> file