fixed bug with buy button in gallery