Simplified the logic
Merge remote-tracking branch 'devel/optout' into devel-master

* devel/optout:
  Simplified the logic

Conflicts:
	CMakeLists.txt