England hooker Dylan Hartley is determined to mend his ways as he looks to secure his place in the Six Nations side.