work around Mozilla bug 1001853 with a slight delay in the .resizeAndDraw() call