Fix #379, Preview and saving variables fixed