Clean up logic around associate ids to make it easier to debug