Removal of unwanted padding