Added method-override requirement to avoid using deprecated method.