added additional check for kernel