fix bad tuple error