Fixed to use new API