Fix issue which caused the preview to not appear