Minor Modifications and bug fixes