Fixing a bug where http was beeing saved even if there was no url