Fix a couple bugs -- thx newKidOnTheBlock