Fixing pool scripts