Added rudimentary handling for IndexOutOfBoundsException for Next/Previous image functions