Updated linked list so it treats previous references correctly

I forgot that this was a double linked list so I need to make sure to
set the prev correctly. This was tested