fixed the webapp so it removes non-existing msgs from the cache