Don't allow to continue past index 0 and refactor code a little bit.