change deprecated method to recommended method.
change for 1.7.10pre-4