Updated for kh 3.3+