bugfix to gallery images with different sizes (caused by fixing another bug!)