Fix memory leaking when rendering world maps