Minor Bug Fixes and Improvements