Couple of Bug Fixes and Improvements