Fixes issue #1. Gallery rotation fails on empty captions.