fix the js issue with bp 1.6+