dynamic modal is working but appears to side of screen and original copied div just disappears