Fixed error 500 on non-migrated db