fixed save references, hopefully addresses #22