Small fixes to the logic against the main-branch version.