Fix swift

Fixes #816!