Parasitic currents in electrochromic devices