Fix scan behaviour