improved handling for queue outside dynamincaly scoped environment
variable