Corrected DIM internal function (removed a pointer pointing to nowhere)