fixed image swap function in editor