Prevent looping

Signed-off-by: hariji <hariharan@freshdesk.com>