Add IsNotPing test and fix code