fix initialization of flycheck, add scalamode init