Canvas resize fix