fixed the with-draw-context function to actually close the quil window