Add missing countries

This patch adds the missing country codes and fix the out of bounds errors.