Fixed noteExists method.