I fixed a bug in the copied over code.