Import fixes from Michael for Arduino 1.5.7