Fixes for new version of swift and xCode