close preview after insertion