fixing seg fault of gzserver