Fixing back socket url validation logic