fix bug where endpoints were getting stacked, more rests