Fix for writestring