Fix #159 + cleanup + queue length