Fix drawing, leaking globals