fix bug: crash when moving painting