fix previewer calculation

there was an import error that was always getting swallowed