remove ks-debug logic. Fixes #610