when dealing with an error, only remove sources