raft: move setting after checking