Fixed rest bugs