Fix database.js