Fixes obscure bug that was preventing click events from binding -- modals are finally working as intended