fixed bpmapply