Prevent crash due to API consolidation

Courtesy of @florentx