Fix bug with updating the database

refs #7550