fixed a bug, I think. May have improved more