fix Server crash issue