fixed some terminal issues