bug fixes kpoints