fix indicator calculation