fix bug for put