Swap model fix

Fix swap model error introduced by previous fix for #22.