Fixed bullshit with tee and variables renaming