Code didn't handle well modals. Now it does!