Adjusted code according to the changes in the core API