Fixed a server crash related to #162