Fix variable refs