fixes race/class switch bug