Fix black display due to missing window resizing at the beginning.