Rectify a mistake of conversion in resize()