debug should resize too