fix 'repository next' issue (fix #11)