fixed bug #26: nav doesn't go beyond page range