Got rid of deprecated method calls