fixed some bugs, caused by swift syntax changes

this changes come with xcode beta 4