Fixed some bugs caused by Swift Xcode betas