weird references problems with xcode