Track showPreview variable correctly.