Changed order of resize call.