fixed the database or asserts in the production mode