When light goes from an optically rarer to an optically denser medium,
Total Internal reflection happens only when light is travelling from an optically denser medium to an optically rarer medium.