Changed window to RenderWindow