Fix a couple of undefined indexes

Signed-off-by: Shitiz Garg <mail@dragooon.net>