Some fixes for kote.py