Fixed some problems with the ios build