Fix swift compile errors