Made tab switching work in input mode