fixes scan and added blocking