updated terminal overwriting issue