Close queue

fix for #47