Minor Bug fixes