Fixed issue with values having wrong variables