removed and reinitialized the bootstrap modal every time modal is opened.