Replace deprecated methods