Update modal logic