Fix for issue #130 at option for looping at end.