minor fix  for tan and restore