Updated the controller to no longer use a deprecated method.