H5 writing fixes