fix assets writing