Fix bug passing the customs through, and test to cover it