fixed issue with terminal take over ruining cursor position