check integrity of the deposit and correct some minor issues