Updated from deprecated methods.