Fixes gallery image loading error