Are you certain you are using a fundamental mode, AT cut crystal ?
If the oscillator is running at a much lower freq than expected, it's possible that it's an overtone crystal and is resonating at it's fundamental frequency.
How are you constructing the design ?, in a way that minimises stray capacitance and inductance ?
If soldered, have you completely removed any flux around the components ?
If construction is on breadboard, try soldering the bits directly together, no sockets or anything else, keeping all wires as short as possible, and just sit the final blob of bits on a piece of card or something. Breadboards are notorious for screwed up analog because of the stray capacitances involved.
Makes sure the other gates in the package are either static, or loaded in some way, tie them to Vss if not.
Power supply is really well decoupled ?
Rf seems a little low for 40Khz...Higher the freq, lower the feedback resistor value, so start with a better value for that, then calculate the other components...
rgds
actually, now that I think about it, are you adding anything that would load the output properly ?