Added better padding support.