Fix to bug #19

ignore messages with invalid types to prevent unexpected crashing