fix getting first element of ks