Fixed overwriting of user's output