correcting resising bug