fix bug and ambiguity caused by the new setK() method