Fix bug in list-ref