proper handling of corrupt messages