Replaced deprecated method calls to reflect 2.7 API changes.