corrected gallery bug