fixed bugs in simple_kernel.py