Fixes to teh domain API