fixed navigation issues (bug with switching between modes)