Fixed errors in Kernal.py