fix bug in NextEx2, was trying to dereference a nil pointer