fix bug that is expanded box not shrink