Fixed queue length check in driver