fixed swift 1.1 errors