bugfixes for shrinking canvas