Replaced atoi() with strtol() for better error handling.

If atoi() fails to convert, '0' is returned which matches the root user affecting the search group pool.