fixed crashes on android browser due to ctx.width = ctx.width hack