Added new test cases
Fix bug regarding index array out of bound if no '-' entered at all