fix err tuple