Fixed crash on startup

Also added trainer min level which required the sqllite database to be
converted.