Changes for compatibility with Swift 1.1