Updated compile errors compatible with Swift 1.0