fix bug,display error when resize view.