Fixing direct variable edit into setter function