fix a bug in py server