bug fixes for kmajor