before error handling.