Fixed listAll function