Modified kernel with small fix