error handling on caption