bug when navigation was not defined