Fix for missing index error