fixes in monitor termination

Change-Id: I603c3f3f921a7debc593fb6ad8b37c16feb212db