fixes for kernel to compile with BFS