resolving errors updating gallery fields