fix preview js