Added queue empty check in worker & minor fixes