Made localize a bit more intelligent.