Fixing URL input to avoid crashes