Fix bugs on Arduino Due version