Implement before methods.