Fixing tab selection issue on tablets