Fixed some syntax errors caused by changes in Swift.