fix errors in unit test and reservation test