Fixing bug with lower case table names after using create index