more bug fixs