Fix tab crash
Add branch tests