Fixed bug where spritzing continued after close