some late night last minute coding fixes for kf