Fix modal bug potentially, needs to be tested