---Fixed density write out errors