fix navigate to out of range exception