Rewrite/fix commit "Fix navigate.exit preventing and history..."

Fixed commit: 72600fdc7282668f96b1b7b350d27e0b540722d0