Fixed bug in getpoolcreds