creates modal on click of top card but appears then immediately disappears, need to figure out why