Fix bugss

Some fixes. And bdd update.