Fix realm cache