Compatible with api 8

Signed-off-by: Andrea Cappelli <a.cappelli87@gmail.com>