bug fixes for new xcode