Fixes exception missing database