minor bug fixs