Fix undefined index

Signed-off-by: Bimal Yashodha <kb.yashodha@gmail.com>