Fixed kernel compilation errors