added length exception for incoming packet