minor bug fixses