Fix prepareId() only escaped first occur