Fix several bugs with the image gallery, one pretty major one and a few minors

there is a waldorf side too