try to deal with resize