Sync 331

Thanks @mseaton!
Can you describe what these changes are needed for?