fix bug of removing controls