Fix issue with multiple items in queue picking up previous data due to timeout always getting the variable state. dereferenced via function