minor bug  fixes