Added check to see if the global pool is being used before using the global agent
Merge pull request #596 from Cauldrath/specific_pool

Global agent is being used when pool is specified