fixed crash after succsfull scaning