Fix bug - use the correct free variable set