fix some bugs, design print dialog