fixing bug with deadends getting current