DEMA: fix implementation (DERP!)