Corel painter 2019 randomly changing brushes using huion tablet

I have been having an issue using corel painter 2019 windows 10 with my huion kamvas 13 pro, i've binded various shortcuts to huion keys but if i press them sometimes it randomly changes the brush. This becomes particularly annoying if it changes to the kneaded eraser brush. This bug most commonly occurs when pressing the pen button binded to the alt key. I've reverted back to using corel painter 2018 as it is bug free. Please fix this its super annoying.