fixing double render of modal