Added disconnect trigger
Fixed query result returning, index creation.