Add dirty checking for older browsers