Final fixes for #1620