minor functional fixes and changes