Daniel Foley
moved length checking upstream to retrieval
07f86c6