Variables reset when opening/closing serial monitor