Fixed Logic Issues

Fixed a handful of scope issues causing data to duplicate