Corrects logical issue in quote number incrementing.