found a couple bugs in