fix padding bug for sub-systems