billing API - some bug fix