^C was making the script hang (few scenarios possible). This patch makes sure that the queue operations won't block forever. Potentially related to #167