fixed swift old errors