Fixes database lock exceptions

Thus fixing characters not loading their data correctly from the
database after server-restart. Database engine-related lock file stats should be correct now.