Bug fixing on dropping foreign key index