Fix bug that prevents image from being rendered on load.