Important padding and logic fixes for 3.2.