*fixed: packet handling logic