fix snapshot length retrieval