Fixing writeDRM problems