         :ok = UART.write(state.nerves, str)
         {:noreply, %{state | current: current}}
       current ->
+        if state.current.timer do
+          true = Process.cancel_timer(state.current.timer)
+        end
         next = %{state |
           current: current, status: current[:status] || :idle, timeouts: 0
         }

  @spec handle_locked(current, Context.t) :: :locked
  defp handle_locked(current, ctx) do
    if current do
      Process.cancel_timer(current.timer)
    end
    # Side effects.
    Farmbot.BotState.lock_bot(ctx)

  @spec handle_busy(current) :: current
  defp handle_busy(current) do
    debug_log "refreshing timer."
    true = Process.cancel_timer(current.timer)
    timer = Process.send_after(self(), :timeout, @default_timeout_ms)
    %{current | status: :busy, timer: timer}
  end
