few minor bug fixes