fix rare slave crash