fix bugs in BP.Modal, switch card style popover to a Modal instance