fixed text writing to device