Fix issue with empty caption showing on gallery load