windowDialog not closing ?

hi yall. i’ve rolled my own addon to change the volume on our AVR and its not behaving the same way in kypton like it did in jarvis. i’m really stumped. i would appreciate some direction on how to squish some bugs.

when i run the addon on my desktop (mint17/krypton), it does like it should… get the current volume, adjust it, draw a slider … and make it go away. when i run the same on my pi3 ( libreElec8 ) it does the same… but it doesn’t close ? stranger yet, if i smash the button twice in quick succession; exec my addon a 2nd time before the 1st is done, it will close.

am i doing something wrong ?
im doing it just like GUI_tutorial (wiki)

Code:
# visual feedback
window = xbmcgui.WindowDialog()
window.addControl(TEXT)
window.addControl(SLIDE)
SLIDE.setPercent(int(CurrentVOL))
window.show()
# clean up
xbmc.sleep(1000)
window.removeControl(TEXT)
window.removeControl(SLIDE)
window.close()