Fixing a ref to deprecated method