Fixed invalid shutdown function.
Always assume REMOTE_ADDR in $_SERVER is a valid IP address.
Don't return false in functions that call get_ip_address.