Fixed issue with processing queue on error

Fixed error of variable being undefined when processing the queue after
an error.