fix bug current definition is not detected at start of it