Adding log.trace to a bunch of functions because I'm lost... An error shows up where I don't think it should.