Added header and found a bug.