Fix bit shift which is beyond int size(16bit)