fixed bug in new v2 api