Couple of bug fixes

Bug Fixes