Fixing issue #6. Bug in closing queues due to not waiting for handler callbacks to finish.