Fixed a bug in normal retrieval code.