finish condition fixed and queue issue