Fixed empty canvas issue