fix snap image edge bug