Actually, this makes me realize that my implementation is wrong.