Fixing URL detection