device to ttyDevice bug