fix padding end issues