add document resize fix