fix LeafJS to pass test