Fix server crash
Merge pull request #1610 from robin4002/NextGen

Fix server crash