Fixed hostname rule.

Now it should remove the old hostname and insert new one instead.