Fixed coveirty defects for concurrency, variable comparison etc

Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>