some fixes on rest