fixed a bug in preview popup