Fixed bug when dropping tables which contains foreign key constraints