Fix bug where retrieveAll always returned an empty list