fixed errors for xcode7