first fix for text write