Small changes to fix issue in which window resize will rever the strokeStyle to black instead of the current color selected by the user.