Fixing deprecated methods