Only downsize the limit here may cause the infinity loop here. We need to have some another parameter to force the canvas size smaller then original computed size.