Fixed debug code crashing server