Fix resize after changing to doc ready