How to avoid tax trouble.