fix prompt issue on rare occasions