A trade treaty gave the Dutch command of the spice trade but reserved Johor 's rights in tin exports from Perak , Selangor , and Klang .
The Dutch had control of both the spice and tin trade after the treaty .