There is a fix in the GitHub repo for Arduino https://github.com/m5stack/M5StickC/pull/52 .