Fixed a bug in the kernel class