fix delete image inside insert in firefox with tests