Fix some small bugs preventing the tab to be created.