Agent keeps state whether monitoring is active.

Minor fixes in the UI