Work around bug with resizing in Chrome