Fixed Swift Demo bugs

fixed swift demo bugs