fixing tab selection