fix bug in navigation with multiple highlights

Fixes #309