Fix bugs, improve b3

Fix few significant b3 bugs.