Perhaps your UI object is persistent and thus you create another of it? You can check using the debugger ("All instances" panel)
If your drawing code is "live", I would also recommend checking that you did do
if (live_call()) return live_result;
and not just
live_call();