fixed seg fault issue in open packet