bugfix for f::write