bug fix in canvas brush