Avoid refreshing url when the target is the same as current