Update tab title in panel on mark/unmark.

Also fix marking issues arising from tab ID being passed as a String
instead of an int.