gallery quantities bugfix