Fixed server crash bug