Changed the variable in clearfrompile to trade