Removes usage of deprecated API