Arduino Nano V3 only runs sketch correctly after hitting reset or starting serial monitor