Fixed a warning - got rid of deprecated method.