fix pireport and db init