handle invalid urls