Improve title handling and error handling.