Change deprecated method to current one