fix error when adding localhost