fix preview problem and update some configurations.