preview.js + fixed some errors.