Issue #50 fix for image galleries