add $_D.length check to changed flag