Fixed database.js can now again assign an index