Added tests and fix for multiparemeter contexts

See #174