fix bug in terminal dot detection