Fixing asset functions in gallery