Fix set key method error