Avoid use of deprecated methods