Fixes issue with preview mode and live-edit.