add preview control and fix bug