some improvements in navigation generation