fixes for seemingly working scan