Cleanup logic.

Signed-off-by: Sanjeev BA <iamsanjeev@gmail.com>