Fix bug in observer tests