Fix server-crash with non-existing items.
Only fixes the server crash.
Merge pull request #1141 from Howaner/GlobalFixes

Fix server-crash with non-existing items.