write fixes