check and filter negative packet length