fix bad padding removal