Fixed an issue with opening a new pool from sub thread.