Fix possible undefined index

Quick fix.