OPEN-628: Fix undefined index error