Fixed Swift Syntax

Fixed compile errors generated by Swift updates from beta 5.