fix and improve preview