fixed possible bug in addScrap()