Fix undefined index in command