fix misc errors under BP1.8+