Fixed errors for 6.1 xcode