Replace deprecated methods
Merge pull request #762 from bhariharan/unstable

Replace deprecated methods