Fixes to work with the latest version of Swift.