Fixed many bugs reporgrammed gui add packet handler interface