fixed an error in 1823 matt