Fix not loading when preview is not defined