better handling of signature cleaning