fix scan bugs. should be done