JS allocation fixes for MKClient