Fixed error on invalid packet