a Couple of small Bug fixes

Found a couple of small issues that once corrected, made performance a bit better