fix bug around dropping table or view