Swift migration fixes