Fix minor build issue and complete the fix for #1963

Small fixes required to test #1938.