Fixed server crash

Fixed crash when mod was loaded on a server.