Fixed crash on scan