fixed kernel cleanup