Fix setKey behavior.