Fixed bug in extractGhostKernel