fixed ruby nav loop