html canvas ref fix