improve tkhack for deployment