Fixing Object #<Object> has no method 'prev'