Fix bug in resize and move code that triggered dommodified when it wasn't