Fix realm tests