some Bug fixing