For being able to remove or replace tabs, it is also necessary to call this function with 'remove' mode.