fixed a problem in ks file