minor bug fixes and improvments