fixed dumb -1 bug