Better handling of gallery (mason)