fixed gallery bug on mobile