       Process.cancel_timer(current.timer)
     end
     # Side effects.
-    Farmbot.BotState.lock_bot(context)
+    Farmbot.BotState.lock_bot(ctx)
     :locked
   end
 

    case results do
      {:status, :done}   -> handle_done(current)
      {:status, :busy}   -> handle_busy(current)
      {:status, :locked} -> handle_locked(current, context)
      {:status, status}  -> %{current | status: status}
      {:callback, str}   -> %{current | callback: str}
      {:reply,  reply}   -> %{current | reply: reply}


  def handle_call(:emergency_lock, _, state) do
    UART.write(state.nerves, "E")
    status = handle_locked(state.current, state.context)
    next = %{state |
      current: nil,
      timeouts: 0,
