fix bug with gallery widget