fix bug  in write entry service