reversed order of checking to work around rdar://14952597
fixes #595
Merge pull request #596 from Cocoanetics/od/issue_595

reversed order of checking to work around rdar://14952597