minor fixes to v1 and v2 api