Fix logic for kernel version