Ensure captions are only created when necessary