fixed bug that caused inconsistency after smoothing