Fix only get canvas width & height once