Fix navigation JSON generation bugs