Thanks to the Automatic Identification System (AIS), ships and other maritime equipment are able to communicate with each other, for example, by sending information about their position. This solution allows for early collision detection when two or more ships are on a collision course. In the newer version of AIS, a satellite infrastructure is used to extend the communication range. Unfortunately, satellite AIS deals with so-called packet collision effect: since there is a problem with synchronizing AIS data coming from multiple terrestrial areas, a single satellite may receive several AIS messages at the same time and be unable to correctly process them, causing the data to get lost or garbled. In this article, a machine learning based framework for detecting the incorrect AIS data is presented. In this approach, after the first stage (clustering), a dedicated anomaly detection algorithm searches for damaged AIS messages and conducts multi-label classification (with Random Forest and wavelet transform) to decide which fields of such message requires further correction. The results of measuring the effectiveness of the proposed approach using real AIS data are presented.