Fixed bug after 'resize' event