fixed bug in swift fallback to legacy
Merge pull request #631 from badrock/fix_swift_fallback

fixed bug in swift fallback to legacy