Updated deprecated method to kill warning.