fixed index errors on invalid input for item use