Fixes for latest swift version