fixed some deprecated code

I've mistaken this repository for fixing sample codes. This pull request should be canceled.

Sorry for bother you.