fixed checking of poolSize in constructor