Fix padding issue in sampleapp