fix slave bug