Found the error

Adding to closedList in wrong area.