fixing issue with variable set