Changed view variable set logic