partial trace and findstates both now function correctly