Fixed build problem due to api change in v2.0