Fix implementation for deprecated method