fixing issue around variables