fix knox bugs.