Fixed rulegen for string variables