Bug fixes and Improvements