fixed dumb error causing infinite loop