fix the slave bug