Fix swift code