Works a bit, but some minor errors that we can't find