Man who confessed to murder gets lesser charge because of police mistake