Fixed valid_url() function