Update kernel.cpp

update for some invalid messages